import request from '@/utils/request'

export function getMenuTree() {
  return request({
    url: '/api/SysMenu/tree',
    method: 'get'
  })
}

export function getResources() {
  return request({
    url: '/api/SysMenu/resources',
    method: 'get'
  })
}

export function delmenuRequest(data) {
  return request({
    url: '/api/SysMenu/delete',
    method: 'post',
    data
  })
}

export function menuInsert(data) {
  return request({
    url: '/api/SysMenu/insert',
    method: 'post',
    data
  })
}

export function menuUpdate(data) {
  return request({
    url: '/api/SysMenu/update',
    method: 'post',
    data
  })
}

export function getMenuBtn(params) {
  return request({
    url: '/api/SysMenu/button',
    method: 'get',
    params
  })
}

export function getRoleMenu(params) {
  return request({
    url: '/api/SysMenu/menuOfRole',
    method: 'get',
    params
  })
}

